
#ifndef     FILE_MAPLOADER_HPP
# define    FILE_MAPLOADER_HPP

# include <string>

# include "ticpp.h"

# include "Scene/Game/Map.hpp"

namespace   File
{
    class   MapLoader
    {
        public:
            MapLoader();
            virtual ~MapLoader();

        public:
            Scene::Game::Map*    loadFile(std::string const & filepath);

        private:
            void    _initSize(ticpp::Element* sizeTag);
            void    _initTextures(ticpp::Element* texturesTag);
            void    _initItems(ticpp::Element* itemsTag);
            void    _initItem(ticpp::Element const & itemTag);
            void    _initPositions(ticpp::Element* positionsTag);

        private:
            ticpp::Document     _xmlFile;
            Scene::Game::Map*   _map;
    };
}

#endif      // FILE_MAPLOADER_HPP
